package com.lingyue.commons.enums;

/**
 * <pre>
 *     description:
 * </pre>
 *
 * @author deep.wu
 * @version 2020-03-23
 */
public enum FailedReasonEnum {
    /**
     * <pre>
     *     description:
     * </pre>
     *
     * @author deep.wu
     * @version 2020-03-23
     */
    FAL_ID_1(1, "4", "去他店"),
    FAL_ID_2(2, "11", "系统推送");
    int status;
    String value;
    String msg;

    FailedReasonEnum() {
    }

    FailedReasonEnum(int status, String value, String msg) {
        this.status = status;
        this.value = value;
        this.msg = msg;
    }

    public int status() {
        return this.status;
    }

    public String value() {
        return this.value;
    }

    public String msg() {
        return this.msg;
    }

    public static String getValue(int status) {
        for (FailedReasonEnum item : values()) {
            if (status == item.status()) {
                return item.value();
            }
        }
        return null;
    }

    public static String getMsg(int status) {
        for (FailedReasonEnum item : values()) {
            if (status == item.status()) {
                return item.msg();
            }
        }
        return null;
    }
}
